﻿@model IEnumerable<Icoders.MarketTracker.Core.MasterData.Product>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<div class="button-link">
    @Html.ActionLink("Create New", "Create")
</div>
<table id="data-grid">
    <tr>
        <th></th>
        <th>
            Name
        </th>
        
        <th>
            ClientName
        </th>
        <th>
            CreatedOn
        </th>
        
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
            @Html.ActionLink("Details", "Details", new { id = item.Id }) |
           @Html.ActionLink("Delete", "delete", new { id = item.Id }, new { onclick="return confirm('Are you sure your to delete')"})
        </td>
        <td>
            @item.Name
        </td>
       
        
        <td>
            @item.ClientName
        </td>
        <td>
            @String.Format("{0:g}", item.CreatedOn)
        </td>
       
    </tr>
}

</table>

